#!/usr/bin/perl
#
# Make a data file for country info
# This is a structured variable containing lots of country info.
# Maybe useless.
# Sub-id structure:
#    $country{$sub} contains an array of "same shape" things
#
use Data::Dumper;
use Reportsub;

getcountryinfo;
for $key (keys(%usercount)) {
    if ($population{$key} == 0) {
	print STDERR "Error: $key has zero population\n";
	next;
    }
    $country{$key}{usercount} = $usercount{$key};
    $country{$key}{hostcount} = $hostcount{$key};
    $country{$key}{longname} = $longname{$key};
    $country{$key}{population} = $population{$key};
}
print Data::Dumper->Dump([\%country], [country]);
print "1;\n";
